#ifndef _COLLISIONDETECTOR_H
#define _COLLISIONDETECTOR_H

#include <memory>
#include "module_base/util.h"
#include "cuda_base/cuda_base.h"
#include "obstacle_detector/util.h"
#include "obstacle_detector/debug_display.h"

namespace obstacle_detector
{
class CollisionDetector
{
public:
	CollisionDetector(bool debug);
	~CollisionDetector(){};
	void set_state(float *states);
	void set_vehicle_param(const module_base::VehicleParam &vehicle_param);
	float check_collision(const module_base::Location &loc,const std::vector<Object> &objects);

private:
	bool debug_;
	module_base::VehicleParam vehicle_param_;
	float states_[51*4];

	float *predict_bbox_gpu_; //障碍物预测框
	uint8_t *bbox_index_gpu_; //对应的障碍物预测框是第几个框
	int *min_collision_index_gpu_;
	float *state_gpu_;

	std::unique_ptr<DebugDisplay> debug_display_;


};

}

#endif 